package com.shigu.admin.common;

import java.io.Serializable;
import java.util.HashMap;

/**
 * json的返回值
 * Created by zhaohongbo on 17/5/10.
 */
public class JSONResponse extends HashMap<String,Object> implements Serializable{

    private JsonResultType result=JsonResultType.SUCCESS;

    private String msg;

    public JSONResponse() {
        this.put("result",result.toString());
    }

    public JSONResponse(JsonResultType result, String msg) {
        this.result = result;
        this.msg = msg;
        this.put("result",result.toString());
        this.put("msg",msg);
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.put("msg",msg);
        this.msg = msg;
    }

    public JsonResultType getResult() {
        return result;
    }

    public void setResult(JsonResultType result) {
        this.put("result",result.toString());
        this.result = result;
    }

}
